Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/hgweb.py @ 1122:fb008a1a0a32
Use .has_option to avoid the unknown Exception.
author | Ollivier Robert <roberto@keltia.freenix.fr> |
---|---|
date | Sat, 27 Aug 2005 23:44:02 -0700 |
parents | 14a69c4988cd |
children | 457c23af92bd |
comparison
equal
deleted
inserted
replaced
1121:14a69c4988cd | 1122:fb008a1a0a32 |
---|---|
943 virtual = "" | 943 virtual = "" |
944 | 944 |
945 virtual = virtual.strip('/') | 945 virtual = virtual.strip('/') |
946 | 946 |
947 if len(virtual): | 947 if len(virtual): |
948 try: | 948 if self.cp.has_option("paths", virtual): |
949 real = self.cp.get("paths", virtual) | 949 real = self.cp.get("paths", virtual) |
950 h = hgweb(real) | 950 h = hgweb(real) |
951 h.run() | 951 h.run() |
952 return | 952 return |
953 except: | 953 else: |
954 httpnotfound(virtual) | 954 httpnotfound(virtual) |
955 return | 955 return |
956 | 956 |
957 def header(**map): | 957 def header(**map): |
958 yield tmpl("header", **map) | 958 yield tmpl("header", **map) |