[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[circle] exception while setting published directory
From: |
malcolm handley |
Subject: |
[circle] exception while setting published directory |
Date: |
Sat, 19 Jun 2004 16:41:53 -0700 |
I am still having trouble getting my own circle nodes to work properly,
but it occurred to me that the problems might have started with the
configuration.
I tried to use circle like this:
python circle start
python circle publish ~/Projects/circlepublic
Public directory set to /Users/malcolm/Projects/circlepublic.
Traceback (most recent call last):
File "/Users/malcolm/Projects/circle/Circle-0.40e/circle", line 140,
in ?
daemon.Circle_daemon().run()
File
"/Users/malcolm/Projects/circle/Circle-0.40e/circlelib/daemon.py", line
258, in run
self.file_server.set_roots(self.config)
File
"/Users/malcolm/Projects/circle/Circle-0.40e/circlelib/file_server.py",
line 801, in set_roots
if config['download_dir'] != '':
KeyError: 'download_dir'
Traceback (most recent call last):
File "<string>", line 1, in ?
File "<string>", line 62, in ?
EOFError
I made the following change to work around this but it's hard for me to
believe that this is a bug and I am the first person to notice this.
How do other people use circle from the command line? Am I doing
something wrong? (I get the same result with the code in CVS.)
===================================================================
RCS file: /cvsroot/circle/circle/circlelib/file_server.py,v
retrieving revision 1.135
diff -u -5 -r1.135 file_server.py
--- circlelib/file_server.py 16 Jun 2004 04:41:00 -0000 1.135
+++ circlelib/file_server.py 19 Jun 2004 23:00:50 -0000
@@ -793,31 +793,31 @@
def set_roots(self, config):
roots = [ ]
self.private_directory = ''
- if config['public_dir'] != '':
- list =
map(string.strip,string.split(config['public_dir'],','))
+ if config.get('public_dir', '') != '':
+ list =
map(string.strip,string.split(config.get('public_dir', ''),','))
if list:
roots.extend(list)
- if config['download_dir'] != '':
- list =
map(string.strip,string.split(config['download_dir'],','))
+ if config.get('download_dir', '') != '':
+ list =
map(string.strip,string.split(config.get('download_dir', ''),','))
if list:
config['download_dir'] = list[0]
roots.extend(list)
- if config['private_dir'] != '':
- list =
map(string.strip,string.split(config['private_dir'],','))
+ if config.get('private_dir', '') != '':
+ list =
map(string.strip,string.split(config.get('private_dir', ''),','))
if list:
self.private_directory = list[0]
roots.extend(list)
for i in range(len(roots)):
roots[i] = (utility.force_string(roots[i]), flags_full)
- if config['publish_apt'] :
+ if config.get('publish_apt', '') :
roots.append(('/var/cache/apt/archives',flags_deb))
# avoid redundancy (prefixes) in the roots list
np_roots = [ ]
for root in roots:
- [circle] exception while setting published directory,
malcolm handley <=