src/eric7/MicroPython/Devices/DeviceBase.py

branch
mpy_network
changeset 9779
8d3c7c991085
parent 9776
210bf87ae5c7
child 9781
3112f77f722b
equal deleted inserted replaced
9776:210bf87ae5c7 9779:8d3c7c991085
415 entry 415 entry
416 @rtype list of tuple of (str, str) 416 @rtype list of tuple of (str, str)
417 """ 417 """
418 return [] 418 return []
419 419
420 ################################################################## 420 def _showError(self, method, error):
421 ## Methods below implement the file system commands 421 """
422 ################################################################## 422 Protected method to show some error message.
423
424 @param method name of the method the error occured in
425 @type str
426 @param error error message
427 @type str
428 """
429 EricMessageBox.warning(
430 self,
431 self.tr("Error handling device"),
432 self.tr(
433 "<p>There was an error communicating with the"
434 " connected device.</p><p>Method: {0}</p>"
435 "<p>Message: {1}</p>"
436 ).format(method, error),
437 )
423 438
424 def _shortError(self, error): 439 def _shortError(self, error):
425 """ 440 """
426 Protected method to create a shortened error message. 441 Protected method to create a shortened error message.
427 442
436 return decodedError.split["\r\n"][-2] 451 return decodedError.split["\r\n"][-2]
437 except Exception: 452 except Exception:
438 return decodedError 453 return decodedError
439 454
440 return self.tr("Detected an error without indications.") 455 return self.tr("Detected an error without indications.")
456
457 ##################################################################
458 ## Methods below implement the file system commands
459 ##################################################################
441 460
442 def ls(self, dirname=""): 461 def ls(self, dirname=""):
443 """ 462 """
444 Public method to get a directory listing of the connected device. 463 Public method to get a directory listing of the connected device.
445 464

eric ide

mercurial