v.licheni.net
/
stack
/
code
/
dboxswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2d03d47
)
get dropbox directory in an os dependant way in ProfHandler
author
stack
<stack@inventati.org>
Sun, 8 Jul 2012 19:36:42 +0000
(21:36 +0200)
committer
stack
<stack@inventati.org>
Sun, 8 Jul 2012 19:36:42 +0000
(21:36 +0200)
profhandler.py
patch
|
blob
|
history
diff --git
a/profhandler.py
b/profhandler.py
index
e5abd82
..
5ef71e5
100755
(executable)
--- a/
profhandler.py
+++ b/
profhandler.py
@@
-131,11
+131,12
@@
class ProfHandler():
def getDropboxDirectory(self):
pl = platform.system()
def getDropboxDirectory(self):
pl = platform.system()
- if pl
== 'Linux'
:
+ if pl
in ('Linux', 'Darwin')
:
return os.path.join(os.path.expanduser('~'),".dropbox")
elif pl == 'Windows':
return os.path.join(os.path.expanduser('~'),".dropbox")
elif pl == 'Windows':
- raise NotImplementedError, "Not implemented yet."
- elif pl == 'Darwin':
+ assert os.environ.has_key('APPDATA'), Exception('APPDATA env variable not found')
+ return os.path.join(os.environ['APPDATA'],'Dropbox')
+ else:
raise NotImplementedError, "Not implemented yet."
raise NotImplementedError, "Not implemented yet."