eric6/MicroPython/MicroPythonFileSystemUtilities.py

changeset 8234
fcb6b4b96274
parent 7923
91e843545d9a
--- a/eric6/MicroPython/MicroPythonFileSystemUtilities.py	Tue Apr 13 17:49:05 2021 +0200
+++ b/eric6/MicroPython/MicroPythonFileSystemUtilities.py	Tue Apr 13 18:02:59 2021 +0200
@@ -106,10 +106,7 @@
     @rtype list of tuple of (str, tuple)
     """
     try:
-        if dirname:
-            files = os.listdir(dirname)
-        else:
-            files = os.listdir()
+        files = os.listdir(dirname) if dirname else os.listdir()
     except OSError:
         return []
     

eric ide

mercurial