updated version to 1.3.0, using shutil.rmtree instead of os.rmdir

This commit is contained in:
k4yt3x 2019-06-25 23:35:42 -04:00
parent 5f69a44bf7
commit a9586bf508

View File

@ -29,6 +29,7 @@ Installation Details:
import argparse import argparse
import json import json
import os import os
import shutil
import subprocess import subprocess
import sys import sys
import tempfile import tempfile
@ -40,7 +41,7 @@ import zipfile
# later in the script. # later in the script.
# import requests # import requests
VERSION = '1.2.1' VERSION = '1.3.0'
def process_arguments(): def process_arguments():
@ -108,7 +109,7 @@ class Video2xSetup:
os.remove(file) os.remove(file)
else: else:
print('Deleting: {}'.format(file)) print('Deleting: {}'.format(file))
os.rmdir(file) shutil.rmtree(file)
except FileNotFoundError: except FileNotFoundError:
pass pass
@ -164,7 +165,6 @@ class Video2xSetup:
print('\nInstalling waifu2x-ncnn-vulkan') print('\nInstalling waifu2x-ncnn-vulkan')
import re import re
import requests import requests
import shutil
# Get latest release of waifu2x-ncnn-vulkan via Github API # Get latest release of waifu2x-ncnn-vulkan via Github API
latest_release = json.loads(requests.get('https://api.github.com/repos/nihui/waifu2x-ncnn-vulkan/releases/latest').content.decode('utf-8')) latest_release = json.loads(requests.get('https://api.github.com/repos/nihui/waifu2x-ncnn-vulkan/releases/latest').content.decode('utf-8'))