0
0
Fork 0
mirror of https://github.com/boltgolt/howdy.git synced 2024-09-19 09:51:19 +02:00

Added migration for old device ids

This commit is contained in:
boltgolt 2018-11-09 20:02:30 +01:00
parent 1c544f0233
commit 33204eeb94
No known key found for this signature in database
GPG key ID: BECEC9937E1AAE26
2 changed files with 6 additions and 1 deletions

View file

@ -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

4
debian/postinst vendored
View file

@ -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