get_errors.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env python3
  2. # This program is free software: you can redistribute it and/or modify
  3. # it under the terms of the GNU General Public License as published by
  4. # the Free Software Foundation, either version 3 of the License, or
  5. # (at your option) any later version.
  6. #
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. #
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. import os
  15. import shutil
  16. CONFIG = os.path.join(
  17. os.getenv("XDG_CONFIG_HOME", os.path.join(os.path.expanduser("~"),
  18. ".config")), "retux")
  19. LOCAL = os.path.join(
  20. os.getenv("XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local",
  21. "share")), "retux")
  22. if __name__ == "__main__":
  23. try:
  24. shutil.copy(os.path.join(LOCAL, "stderr.txt"), os.getcwd())
  25. except IOError:
  26. print("No errors have been logged.")
  27. input("Press Enter to exit.")