diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d296b86 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Verwendet IntelliSense zum Ermitteln möglicher Attribute. + // Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen. + // Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Main File execution", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/file2mail.py", + "console": "integratedTerminal", + "justMyCode": true + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5fe0064 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "editor.formatOnSave": true, + "autopep8.args": ["--max-line-length=150"], + "python.formatting.provider": "none", + "[python]": { + "editor.defaultFormatter": "ms-python.autopep8", + "editor.formatOnSave": true + }, + "editor.fontSize": 16, + "emmet.includeLanguages": { "django-html": "html" }, + "python.testing.pytestArgs": ["-v", "--cov", "--cov-report=xml", "__test__"], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} diff --git a/file2mail.py b/file2mail.py index f6f7a59..b23f2f9 100644 --- a/file2mail.py +++ b/file2mail.py @@ -40,7 +40,7 @@ if __name__ == "__main__": config.SEND_FROM, config.SEND_TO, "Gesanntes Dokument - %s" % os.path.basename(filename), - "Hier ist das gescannte Dokument vom Scanner in Buchen:", + "Hier ist das gescannte Dokument vom Scanner in Buchen:", files=[filename], server=config.SMTP_SERVER, username=config.SMTP_USER, @@ -51,7 +51,7 @@ if __name__ == "__main__": else: # Remove file logger.debug("Removing file %s", filename) - os.remove(filename ) + os.remove(filename) # Remove LOCK_FILE logger.debug("Removing lock-file %s", LOCK_FILE) os.remove(LOCK_FILE)