##// END OF EJS Templates
Use if instead of try..except
Dmitry Zotikov -
Show More
@@ -309,11 +309,8 b' def get_pager_cmd(pager_cmd=None):'
309 309 except:
310 310 pager_cmd = default_pager_cmd
311 311
312 if pager_cmd == 'less':
313 try:
314 os.getenv('LESS').index('-r')
315 except (ValueError, AttributeError):
316 pager_cmd += ' -r'
312 if pager_cmd == 'less' and '-r' not in os.environ.get('LESS', ''):
313 pager_cmd += ' -r'
317 314
318 315 return pager_cmd
319 316
General Comments 0
You need to be logged in to leave comments. Login now