1164 if not script: |
1164 if not script: |
1165 EricMessageBox.critical( |
1165 EricMessageBox.critical( |
1166 self, |
1166 self, |
1167 self.tr("Run Script"), |
1167 self.tr("Run Script"), |
1168 self.tr( |
1168 self.tr( |
1169 """The current editor does not contain a script.""" """ Abort...""" |
1169 """The current editor does not contain a script. Abort...""" |
1170 ), |
1170 ), |
1171 ) |
1171 ) |
1172 return |
1172 return |
1173 |
1173 |
1174 ok, reason = self.__device.canRunScript() |
1174 ok, reason = self.__device.canRunScript() |
1175 if not ok: |
1175 if not ok: |
1176 EricMessageBox.warning( |
1176 EricMessageBox.warning( |
1177 self, |
1177 self, |
1178 self.tr("Run Script"), |
1178 self.tr("Run Script"), |
1179 self.tr( |
1179 self.tr( |
1180 """<p>Cannot run script.</p><p>Reason:""" """ {0}</p>""" |
1180 """<p>Cannot run script.</p><p>Reason: {0}</p>""" |
1181 ).format(reason), |
1181 ).format(reason), |
1182 ) |
1182 ) |
1183 return |
1183 return |
1184 |
1184 |
1185 if not self.replButton.isChecked(): |
1185 if not self.replButton.isChecked(): |