From f357ecf0ea7600adb138a650beb90b9fbdf71fd0 Mon Sep 17 00:00:00 2001 From: tumukei <25088765+tumukei@users.noreply.github.com> Date: Thu, 21 Nov 2019 10:40:33 +0200 Subject: [PATCH] some platforms/builds don't accept listdir arg --- rshell/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rshell/main.py b/rshell/main.py index 5bb5b7a..06cdb4f 100755 --- a/rshell/main.py +++ b/rshell/main.py @@ -740,7 +740,10 @@ def get_stat(filename): def listdir(dirname): """Returns a list of filenames contained in the named directory.""" import os - return os.listdir(dirname) + try: + return os.listdir(dirname) + except TypeError: + return os.listdir() def listdir_matches(match):