src/mercurialserver/ruleset.py
changeset 77 8d14aac93b5d
parent 67 fd16d9a1234b
child 78 2a3407a14654
equal deleted inserted replaced
76:e6a35b0f853c 77:8d14aac93b5d
    86             finally:
    86             finally:
    87                 f.close()
    87                 f.close()
    88         except Exception, e:
    88         except Exception, e:
    89             print >> sys.stderr, "Failure reading rules file:", e
    89             print >> sys.stderr, "Failure reading rules file:", e
    90 
    90 
    91 def rules_from_env():
    91 rules = Ruleset()
    92     res = Ruleset()
    92 
    93     for f in os.environ['HG_ACCESS_RULES_PATH'].split(os.pathsep):
       
    94         if os.path.isfile(f):
       
    95             res.readfile(f)
       
    96     return res