MM2: fixed bug where index file wans't being created

This commit is contained in:
Rudi Grinberg 2012-08-16 14:34:40 -04:00
parent 25b5ad43a1
commit 974858c8f5
2 changed files with 3 additions and 3 deletions

View File

@ -133,8 +133,8 @@ class StoreWatchListener(BaseListener, Loggable, pyinotify.ProcessEvent):
@IncludeOnly(mmp.supported_extensions)
def process_delete(self, event):
evt = None
if event.dir: evt = DeleteDir(event)
else: evt = DeleteFile(event)
if event.dir : evt = DeleteDir(event)
else : evt = DeleteFile(event)
dispatcher.send(signal=self.signal, sender=self, event=evt)
return evt

View File

@ -57,7 +57,7 @@ def main(global_config, api_client_config, log_config,
if not os.path.exists(config['index_path']):
log.info("Attempting to create index file:...")
try:
with open(config['index_path']) as f: f.write(" ")
with open(config['index_path'], 'w') as f: f.write(" ")
except Exception as e:
log.info("Failed to create index file with exception: %s" % str(e))
else: