Skip to content

Commit 6d9fc07

Browse files
authored
works with python3
1 parent 1cfdec1 commit 6d9fc07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

static/recover_apps.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import glob, json, os, subprocess, urllib.request
1+
import glob, json, os, subprocess, requests
22

33
nc_path = '/var/www/nextcloud/apps/'
44
backup_path = '/var/NCBACKUP/apps/'
55
shipped_url = 'http://raw.githubusercontent.com/nextcloud/server/master/core/shipped.json'
66

7-
json_data = json.load(urllib.request.urlopen(shipped_url))
7+
json_data = requests.get(shipped_url, timeout=5).json()
88
shipped_apps = json_data['shippedApps'] + json_data['alwaysEnabled']
99

1010
installed_dirs = set(os.path.basename(path) for path in glob.glob(backup_path + '*'))

0 commit comments

Comments
 (0)