comparison pics2/pics_app.py @ 83:d521df55f56c

fix pinlib cookie parsing and check in pics app
author paulo
date Wed, 29 Jun 2016 00:48:53 -0700
parents d7d67887102f
children 259a484f691b
comparison
equal deleted inserted replaced
7:eb7dadfa4306 8:a08d40194557
140 if len(ppi) < 1 or ppi[0] != '': 140 if len(ppi) < 1 or ppi[0] != '':
141 raise AssertionError("Parsed path length must start empty: " + pi) 141 raise AssertionError("Parsed path length must start empty: " + pi)
142 142
143 self._qs = urlparse.parse_qs(self._environ["QUERY_STRING"]) 143 self._qs = urlparse.parse_qs(self._environ["QUERY_STRING"])
144 logging.debug("self._qs = %s" % self._qs) 144 logging.debug("self._qs = %s" % self._qs)
145 if pinlib.PinMan("lahat").check(pinlib.parse_cookies(self._environ)): 145 try:
146 pinlib.PinMan("lahat").check(pinlib.parse_cookies(self._environ))
147 except pinlib.PinFailError:
148 pass
149 else:
146 self._show_index = True 150 self._show_index = True
147 151
148 if len(ppi) >= 2 and _is_pics_dir(ppi[1]): 152 if len(ppi) >= 2 and _is_pics_dir(ppi[1]):
149 if len(ppi) == 2: 153 if len(ppi) == 2:
150 self._page_func = self.page_thumbs 154 self._page_func = self.page_thumbs