Skip to content

Commit 0b122c9

Browse files
committed
add back the silent mode - got lost in the last merge
1 parent 64dac9a commit 0b122c9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/cdo.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ def __init__(self,
161161
logging=False,
162162
logFile=StringIO(),
163163
cmd=[],
164-
options=[]):
164+
options=[],
165+
silent=True):
165166

166167
if 'CDO' in os.environ and os.path.isfile(os.environ['CDO']):
167168
self.CDO = os.environ['CDO']
@@ -178,6 +179,7 @@ def __init__(self,
178179
self.forceOutput = forceOutput
179180
self.env = env
180181
self.debug = True if 'DEBUG' in os.environ else debug
182+
self.silent = silent
181183
self.libs = self.getSupportedLibs()
182184

183185
# optional IO libraries for additional return types {{{
@@ -218,7 +220,8 @@ def __get__(self, instance, owner):
218220
instance.logging,
219221
instance.logFile,
220222
instance._cmd + ['-' + name],
221-
instance._options)
223+
instance._options,
224+
instance.silent)
222225

223226
# from 1.9.6 onwards CDO returns 1 of diff* finds a difference
224227
def __exit_success(self, operatorName):

0 commit comments

Comments
 (0)