From 99874209118735a25fb2e1ade613dd4b53d7a343 Mon Sep 17 00:00:00 2001 From: Lexi Date: Mon, 11 Jul 2011 18:15:56 +0800 Subject: [PATCH] Create non existent directories before loading the rest of PChum pyquirks was trying to create a subdirectory of a directory that didn't exist :D --- pesterchum.py | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/pesterchum.py b/pesterchum.py index ca50b6d..a03e0f8 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -42,26 +42,11 @@ if not ((major > 4) or (major == 4 and minor >= 6)): print "You currently have version " + vnum + ". Please ungrade Qt" exit() -from menus import PesterChooseQuirks, PesterChooseTheme, \ - PesterChooseProfile, PesterOptions, PesterUserlist, PesterMemoList, \ - LoadingScreen, AboutPesterchum, UpdatePesterchum -from dataobjs import PesterProfile, Mood, pesterQuirk, pesterQuirks -from generic import PesterIcon, RightClickList, RightClickTree, MultiTextDialog, PesterList, CaseInsensitiveDict -from convo import PesterTabWindow, PesterText, PesterInput, PesterConvo -from parsetools import convertTags, addTimeInitial, themeChecker, ThemeException -from memos import PesterMemo, MemoTabWindow, TimeTracker -from irc import PesterIRC -from logviewer import PesterLogUserSelect, PesterLogViewer -from bugreport import BugReporter -from randomer import RandomHandler -from updatecheck import MSPAChecker - +# Placed here before importing the rest of pesterchum, since bits of it need +# OSX's data directory and it doesn't hurt to have everything set up before +# plowing on. :o) +# ~Lex _datadir = os.path.join(str(QtGui.QDesktopServices.storageLocation(QtGui.QDesktopServices.DataLocation)),"Pesterchum/") -canon_handles = ["apocalypseArisen", "arsenicCatnip", "arachnidsGrip", "adiosToreador", \ - "caligulasAquarium", "cuttlefishCuller", "carcinoGeneticist", "centaursTesticle", \ - "grimAuxiliatrix", "gallowsCalibrator", "gardenGnostic", "ectoBiologist", \ - "twinArmageddons", "terminallyCapricious", "turntechGodhead", "tentacleTherapist"] - if sys.platform == "darwin": if not os.path.exists(_datadir): os.mkdir(_datadir) @@ -81,6 +66,26 @@ else: f.write("{}") f.close() +from menus import PesterChooseQuirks, PesterChooseTheme, \ + PesterChooseProfile, PesterOptions, PesterUserlist, PesterMemoList, \ + LoadingScreen, AboutPesterchum, UpdatePesterchum +from dataobjs import PesterProfile, Mood, pesterQuirk, pesterQuirks +from generic import PesterIcon, RightClickList, RightClickTree, MultiTextDialog, PesterList, CaseInsensitiveDict +from convo import PesterTabWindow, PesterText, PesterInput, PesterConvo +from parsetools import convertTags, addTimeInitial, themeChecker, ThemeException +from memos import PesterMemo, MemoTabWindow, TimeTracker +from irc import PesterIRC +from logviewer import PesterLogUserSelect, PesterLogViewer +from bugreport import BugReporter +from randomer import RandomHandler +from updatecheck import MSPAChecker + +canon_handles = ["apocalypseArisen", "arsenicCatnip", "arachnidsGrip", "adiosToreador", \ + "caligulasAquarium", "cuttlefishCuller", "carcinoGeneticist", "centaursTesticle", \ + "grimAuxiliatrix", "gallowsCalibrator", "gardenGnostic", "ectoBiologist", \ + "twinArmageddons", "terminallyCapricious", "turntechGodhead", "tentacleTherapist"] + + class waitingMessageHolder(object): def __init__(self, mainwindow, **msgfuncs): self.mainwindow = mainwindow