From f4e3f1cb46738c47e936d39820abc8c4fa69dd3c Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 4 Feb 2023 19:06:16 +0100 Subject: [PATCH] Excluded pycache from example inclusions --- nomadnet/NomadNetworkApp.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nomadnet/NomadNetworkApp.py b/nomadnet/NomadNetworkApp.py index db94ce9..cd11bfe 100644 --- a/nomadnet/NomadNetworkApp.py +++ b/nomadnet/NomadNetworkApp.py @@ -170,10 +170,9 @@ class NomadNetworkApp: else: if not os.path.isdir(self.examplespath): try: - os.makedirs(self.examplespath) - from distutils.dir_util import copy_tree + import shutil examplespath = os.path.join(os.path.dirname(__file__), "examples") - copy_tree(examplespath, self.examplespath) + shutil.copytree(examplespath, self.examplespath, ignore=shutil.ignore_patterns("__pycache__")) except Exception as e: RNS.log("Could not copy examples into the "+self.examplespath+" directory.", RNS.LOG_ERROR)