Skip to content

Commit 5910ba9

Browse files
committedApr 25, 2018
No print() usage in processing core
1 parent b64a958 commit 5910ba9

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed
 

‎python/plugins/processing/core/Processing.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ def runAlgorithm(algOrName, parameters, onFinish=None, feedback=None, context=No
120120
feedback = QgsProcessingFeedback()
121121

122122
if alg is None:
123-
# fix_print_with_import
124-
print('Error: Algorithm not found\n')
125123
msg = Processing.tr('Error: Algorithm {0} not found\n').format(algOrName)
126124
feedback.reportError(msg)
127125
raise QgsProcessingException(msg)
@@ -130,9 +128,7 @@ def runAlgorithm(algOrName, parameters, onFinish=None, feedback=None, context=No
130128
for param in alg.parameterDefinitions():
131129
if param.name() not in parameters:
132130
if not param.flags() & QgsProcessingParameterDefinition.FlagOptional:
133-
# fix_print_with_import
134131
msg = Processing.tr('Error: Missing parameter value for parameter {0}.').format(param.name())
135-
print('Error: Missing parameter value for parameter %s.' % param.name())
136132
feedback.reportError(msg)
137133
raise QgsProcessingException(msg)
138134

@@ -141,15 +137,11 @@ def runAlgorithm(algOrName, parameters, onFinish=None, feedback=None, context=No
141137

142138
ok, msg = alg.checkParameterValues(parameters, context)
143139
if not ok:
144-
# fix_print_with_import
145-
print('Unable to execute algorithm\n' + str(msg))
146140
msg = Processing.tr('Unable to execute algorithm\n{0}').format(msg)
147141
feedback.reportError(msg)
148142
raise QgsProcessingException(msg)
149143

150144
if not alg.validateInputCrs(parameters, context):
151-
print('Warning: Not all input layers use the same CRS.\n' +
152-
'This can cause unexpected results.')
153145
feedback.pushInfo(
154146
Processing.tr('Warning: Not all input layers use the same CRS.\nThis can cause unexpected results.'))
155147

0 commit comments

Comments
 (0)
Please sign in to comment.