projects
/
cs-p2p-next.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52418bf
)
autorun: changed path for sessions info file.
author
Adriana Draghici
<adriana008@gmail.com>
Sat, 17 Apr 2010 11:30:25 +0000
(11:30 +0000)
committer
Adriana Draghici
<adriana008@gmail.com>
Sat, 17 Apr 2010 11:30:25 +0000
(11:30 +0000)
autorun/Util.py
patch
|
blob
|
history
diff --git
a/autorun/Util.py
b/autorun/Util.py
index
bc00d66
..
0cbb4ed
100644
(file)
--- a/
autorun/Util.py
+++ b/
autorun/Util.py
@@
-6,7
+6,15
@@
SERVER_TYPE = "python"
SERVER_PORT = 10004
SERVER_HOST = "172.16.20.3"
-SESSIONS_FILE = "/home/p2p/sessions.txt" # TO CHANGE
+import os
+def get_sessions_file_path():
+ dirpath = os.environ['HOME']+"/"+".autorun/"
+ if not os.path.exists(dirpath):
+ os.mkdir(dirpath)
+ path = dirpath +"sessions.txt" # FIND A BETTER NAME!!!
+ return path
+
+SESSIONS_FILE = get_sessions_file_path()
BUFFER_SIZE = 4096
""" Message types: client -> server """