From 33204eeb94cf4c8d792b0fbec863855853cedaa1 Mon Sep 17 00:00:00 2001 From: boltgolt Date: Fri, 9 Nov 2018 20:02:30 +0100 Subject: [PATCH] Added migration for old device ids --- .travis.yml | 3 ++- debian/postinst | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ef8aeea..4e168e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,8 @@ script: - 'howdy | ack-grep --passthru --color "current active user: travis"' - 'sudo howdy | ack-grep --passthru --color "current active user: travis"' - - sudo howdy test + - echo "import face_recognition; print(face_recognition.__version__);" > /tmp/h.py + - python3 /tmp/h.py # Remove howdy from the installation - sudo apt purge howdy -y diff --git a/debian/postinst b/debian/postinst index 7130415..6db89a5 100755 --- a/debian/postinst +++ b/debian/postinst @@ -53,6 +53,10 @@ if not os.path.exists("/tmp/howdy_picked_device"): # Go through every setting in the old config and apply it to the new file for section in oldConf.sections(): for (key, value) in oldConf.items(section): + if key == "device_id": + key = "device_path" + value = "/dev/video" + value + try: newConf.set(section, key, value) # Add a new section where needed