1890 os.makedirs(mgmtDir) |
1890 os.makedirs(mgmtDir) |
1891 |
1891 |
1892 try: |
1892 try: |
1893 ms = os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0]) |
1893 ms = os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0]) |
1894 if not os.path.exists(ms): |
1894 if not os.path.exists(ms): |
1895 f = open(ms, "w") |
1895 try: |
1896 f.close() |
1896 f = open(ms, "w") |
|
1897 f.close() |
|
1898 except IOError as err: |
|
1899 E5MessageBox.critical(self.ui, |
|
1900 self.trUtf8("Create main script"), |
|
1901 self.trUtf8("<p>The mainscript <b>{0}</b> could not" |
|
1902 " be created.<br/>Reason: {1}</p>") |
|
1903 .format(self.ppath, str(err))) |
1897 self.appendFile(ms) |
1904 self.appendFile(ms) |
1898 except IndexError: |
1905 except IndexError: |
1899 ms = "" |
1906 ms = "" |
1900 |
1907 |
1901 # add existing files to the project |
1908 # add existing files to the project |