개정판 0a4292cc
issue #000: fix drawing datetime
Change-Id: Ib70ba4ba0742e1db78db9215a6abb0ab8ad2d0db
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
2696 | 2696 |
except Exception as ex: |
2697 | 2697 |
# Roll back any change if something goes wrong |
2698 | 2698 |
conn.rollback() |
2699 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2699 |
from App import App |
|
2700 |
|
|
2701 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
2702 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
2700 | 2703 |
finally: |
2701 | 2704 |
# Close the db connection |
2702 | 2705 |
conn.close() |
... | ... | |
2733 | 2736 |
except Exception as ex: |
2734 | 2737 |
# Roll back any change if something goes wrong |
2735 | 2738 |
conn.rollback() |
2736 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2739 |
from App import App |
|
2740 |
|
|
2741 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
2742 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
2737 | 2743 |
finally: |
2738 | 2744 |
# Close the db connection |
2739 | 2745 |
conn.close() |
... | ... | |
2826 | 2832 |
except Exception as ex: |
2827 | 2833 |
# Roll back any change if something goes wrong |
2828 | 2834 |
conn.rollback() |
2829 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2835 |
from App import App |
|
2836 |
|
|
2837 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
2838 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
2830 | 2839 |
finally: |
2831 | 2840 |
# Close the db connection |
2832 | 2841 |
conn.close() |
... | ... | |
2854 | 2863 |
except Exception as ex: |
2855 | 2864 |
# Roll back any change if something goes wrong |
2856 | 2865 |
conn.rollback() |
2857 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2866 |
from App import App |
|
2867 |
|
|
2868 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
2869 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
2858 | 2870 |
finally: |
2859 | 2871 |
# Close the db connection |
2860 | 2872 |
conn.close() |
... | ... | |
2882 | 2894 |
except Exception as ex: |
2883 | 2895 |
# Roll back any change if something goes wrong |
2884 | 2896 |
conn.rollback() |
2885 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2897 |
from App import App |
|
2898 |
|
|
2899 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
2900 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
2886 | 2901 |
finally: |
2887 | 2902 |
# Close the db connection |
2888 | 2903 |
conn.close() |
... | ... | |
2896 | 2911 |
|
2897 | 2912 |
res = [] |
2898 | 2913 |
try: |
2914 |
xmlList = [xml.replace('.xml', '') for xml in os.listdir(AppDocData.instance().getCurrentProject().getTempPath()) if xml.find('.xml') is not -1] |
|
2915 |
|
|
2899 | 2916 |
# Creates or opens a file called mydb with a SQLite3 DB |
2900 | 2917 |
dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), AppDocData.DATABASE) |
2901 | 2918 |
conn = sqlite3.connect(dbPath) |
... | ... | |
2906 | 2923 |
cursor.execute(sql) |
2907 | 2924 |
rows = cursor.fetchall() |
2908 | 2925 |
for row in rows: |
2909 |
res.append([row[0], row[1], row[2]]) |
|
2926 |
for xml in xmlList: |
|
2927 |
if row[1].replace('.png', '') == xml: |
|
2928 |
res.append([row[0], row[1], row[2]]) |
|
2929 |
break |
|
2910 | 2930 |
|
2911 | 2931 |
# Catch the exception |
2912 | 2932 |
except Exception as ex: |
2913 | 2933 |
# Roll back any change if something goes wrong |
2914 | 2934 |
conn.rollback() |
2915 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2935 |
from App import App |
|
2936 |
|
|
2937 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
2938 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
2916 | 2939 |
finally: |
2917 | 2940 |
# Close the db connection |
2918 | 2941 |
conn.close() |
... | ... | |
2950 | 2973 |
except Exception as ex: |
2951 | 2974 |
# Roll back any change if something goes wrong |
2952 | 2975 |
conn.rollback() |
2953 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
2976 |
from App import App |
|
2977 |
|
|
2978 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
|
2979 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
2954 | 2980 |
finally: |
2955 | 2981 |
# Close the db connection |
2956 | 2982 |
conn.close() |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
635 | 635 |
self._movie.start() |
636 | 636 |
|
637 | 637 |
self._save_work_cmd.start() |
638 |
|
|
638 | 639 |
except Exception as ex: |
639 | 640 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
640 | 641 |
self.addMessage.emit(MessageType.Error, message) |
... | ... | |
644 | 645 |
self._movie.stop() |
645 | 646 |
self.label_spinner.hide() |
646 | 647 |
QMessageBox.about(self.graphicsView, self.tr('Notice'), self._save_work_cmd.resultStr) |
648 |
self.load_drawing_list() |
|
647 | 649 |
|
648 | 650 |
''' |
649 | 651 |
@brief refresh resultPropertyTableWidget |
내보내기 Unified diff