From d334a52e50ea9480e3485808f9ec3d2499fb9d03 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Mon, 23 Jan 2023 20:43:42 +0100 Subject: [PATCH] Code formatting * removed weird linebreaks for for-loop * no () for del statement --- servefile/servefile.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/servefile/servefile.py b/servefile/servefile.py index 39d2789..d830d5d 100755 --- a/servefile/servefile.py +++ b/servefile/servefile.py @@ -527,10 +527,7 @@ class DirListingHandler(FileBaseHandler): target_items.append((item, itemPath, stat)) # Directories first, then files - for (tuple_list, is_dir) in ( - (dir_items, True), - (file_items, False), - ): + for (tuple_list, is_dir) in ((dir_items, True), (file_items, False)): for (item, itemPath, stat) in tuple_list: self._appendToListing(content, item, itemPath, stat, is_dir=is_dir) @@ -874,7 +871,7 @@ class ServeFile(): if oldLang: os.environ['LC_ALL'] = oldLang else: - del(os.environ['LC_ALL']) + del os.environ['LC_ALL'] if proc.wait() != 0: # we couldn't find any ip address proc = None