624 for name in nameParts: |
624 for name in nameParts: |
625 packagePath = os.path.join(packagePath, name) |
625 packagePath = os.path.join(packagePath, name) |
626 if not os.path.exists(packagePath): |
626 if not os.path.exists(packagePath): |
627 try: |
627 try: |
628 os.mkdir(packagePath) |
628 os.mkdir(packagePath) |
629 except IOError as err: |
629 except OSError as err: |
630 E5MessageBox.critical(self, |
630 E5MessageBox.critical(self, |
631 self.trUtf8("Add new Python package"), |
631 self.trUtf8("Add new Python package"), |
632 self.trUtf8("""<p>The package directory <b>{0}</b> could""" |
632 self.trUtf8("""<p>The package directory <b>{0}</b> could""" |
633 """ not be created. Aborting...</p>""" |
633 """ not be created. Aborting...</p>""" |
634 """<p>Reason: {1}</p>""")\ |
634 """<p>Reason: {1}</p>""")\ |