File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
zulip/integrations/log2zulip Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -100,15 +100,16 @@ if __name__ == "__main__":
100100 parser = zulip .add_default_arguments (argparse .ArgumentParser ()) # type: argparse.ArgumentParser3
101101 parser .add_argument ("--control-path" , default = "/etc/log2zulip.conf" )
102102 args = parser .parse_args ()
103- # On posix systems, we set the config directory explicitly for legacy reasons.
104- if not args .zulip_config_file and os .name == "posix" :
105- args .zulip_config_file = "/etc/log2zulip.zuliprc"
106103
107104 lock_path = os .path .join (temp_dir , "log2zulip.lock" )
108105 if os .path .exists (lock_path ):
106+ # This locking code is here to protect against log2zulip,
107+ # running in a cron job, ending up with multiple copies
108+ # running at the same time.
109109 print ("Log2zulip lock held; not doing anything" )
110110 sys .exit (0 )
111111
112+ # TODO: Convert this locking code to use a standard context manager.
112113 try :
113114 open (lock_path , "w" ).write ("1" )
114115 zulip_client = zulip .init_from_options (args )
You can’t perform that action at this time.
0 commit comments