diff --git a/README.md b/README.md index 4bb1100..c0f70da 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ submission-downloader downloads your submissions in bulk from [DMOJ](https://dmo ## Getting Started ### Installing -This program can be installed in two different ways. You can clone the repository and run the code yourself with Python 3 or download prebuilt binaries that will run without Python from our releases page: +This program can be installed in two different ways. You can clone the repository and run the code yourself with Python 3 (recommended) or download prebuilt binaries that will run without Python (convenient) from our releases page: 1. Install the prerequisites with ```$ pip3 install -r requirements.txt```. Next, download [submission-downloader.py](submission-downloader.py). Run the program with ```python3 submission-downloader.py```. diff --git a/submission-downloader.py b/submission-downloader.py index 51ec60e..15cacb6 100644 --- a/submission-downloader.py +++ b/submission-downloader.py @@ -41,14 +41,16 @@ def get_submission_sources(self, submissions): # downloads submissions, filters if self.overwrite == True: try: shutil.rmtree("downloaded-submissions") - os.mkdir("downloaded-submissions") - finally: - os.chdir("downloaded-submissions") + except: + pass + os.mkdir("downloaded-submissions") + os.chdir("downloaded-submissions") else: try: os.mkdir("downloaded-submissions") - finally: - os.chdir("downloaded-submissions") + except: + pass + os.chdir("downloaded-submissions") if self.aconly == True: submissions = [thing for thing in submissions if thing[4] == "AC" or thing[4] == "_AC"] else: