Skip to content
Snippets Groups Projects
Commit 3031b2c0 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

try, except replace with if...else

parent 0dd522b7
No related branches found
No related tags found
No related merge requests found
......@@ -132,9 +132,9 @@ class TM5ObservationOperator(ObservationOperator):
from string import join
DaPlatForm = self.DaCycle.DaPlatForm
try:
if self.DaCycle.has_key('da.obsoperator.home'):
os.chdir(self.DaCycle['da.obsoperator.home'])
except:
else:
tm5_dir = os.path.split(self.DaCycle['da.obsoperator.rc'])[0]
logging.warning('Guessing your TM5 root dir from the rc filename')
logging.warning('Try adding a key da.obsoperator.home to your da.rc')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment