summaryrefslogtreecommitdiff
path: root/playoff.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-08-01 01:35:43 +0200
committeremkael <emkael@tlen.pl>2017-08-01 01:40:54 +0200
commit437666456efe3d3088838855989bc9f876531d98 (patch)
tree0172486c5fdceef26193ffe7507ec9adcfbed92a /playoff.py
parent316abb20f7262efc3dd006d65429dfa9e8226c9c (diff)
Error handling in interactive mode does not abort key input confirmation
Diffstat (limited to 'playoff.py')
-rw-r--r--playoff.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/playoff.py b/playoff.py
index b04cade..59038f8 100644
--- a/playoff.py
+++ b/playoff.py
@@ -1,20 +1,25 @@
+import traceback
from jfr_playoff.settings import PlayoffSettings
from jfr_playoff.generator import PlayoffGenerator
from jfr_playoff.filemanager import PlayoffFileManager
def main():
- s = PlayoffSettings()
- generator = PlayoffGenerator(s)
- content = generator.generate_content()
+ try:
+ s = PlayoffSettings()
- file_manager = PlayoffFileManager(s)
- file_manager.write_content(content)
- file_manager.copy_scripts()
- file_manager.send_files()
+ generator = PlayoffGenerator(s)
+ content = generator.generate_content()
- if s.interactive:
- raw_input('Press any key to continue...')
+ file_manager = PlayoffFileManager(s)
+ file_manager.write_content(content)
+ file_manager.copy_scripts()
+ file_manager.send_files()
+ except:
+ print traceback.format_exc()
+ finally:
+ if s.interactive:
+ raw_input('Press any key to continue...')
if __name__ == '__main__':
main()