MM2: fixed bug where index file wans't being created
This commit is contained in:
parent
25b5ad43a1
commit
974858c8f5
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue