From 334b110289f65dc07d815950e99733c673ce0c97 Mon Sep 17 00:00:00 2001
From: Lawrence Rust <lvr@softsystem.co.uk>
Date: Wed, 8 Aug 2012 14:56:33 +0200
Subject: [PATCH] Fix hardwareProfile to work with MYTHCONFDIR environ
When submitting a hardware profile, the UUID filenames are hardcoded
under ~/.mythtv. This fix honours the MYTHCONFDIR setting and
allows the profile to be created in the correct directory.
Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
---
mythtv/programs/scripts/hardwareprofile/config.py | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/mythtv/programs/scripts/hardwareprofile/config.py b/mythtv/programs/scripts/hardwareprofile/config.py
index 89d468f..918256e 100644
a
|
b
|
import os_detect |
7 | 7 | SMOON_URL = "http://smolt.mythtv.org/" |
8 | 8 | SECURE = 0 |
9 | 9 | from user import home |
10 | | HW_UUID = home + "/.mythtv/HardwareProfile/hw-uuid" |
11 | | PUB_UUID= home + "/.mythtv/HardwareProfile/pub-uuid" |
12 | | UUID_DB = home + '/.mythtv/HardwareProfile/uuiddb.cfg' |
13 | | ADMIN_TOKEN = home + "/.mythtv/HardwareProfile/smolt_token" |
| 10 | |
| 11 | try: |
| 12 | mythconfdir = os.environ['MYTHCONFDIR'] |
| 13 | except KeyError: |
| 14 | mythconfdir = home + "/.mythtv" |
| 15 | |
| 16 | HW_UUID = mythconfdir + "/HardwareProfile/hw-uuid" |
| 17 | PUB_UUID= mythconfdir + "/HardwareProfile/pub-uuid" |
| 18 | UUID_DB = mythconfdir + '/HardwareProfile/uuiddb.cfg' |
| 19 | ADMIN_TOKEN = mythconfdir + "/HardwareProfile/smolt_token" |
14 | 20 | |
15 | 21 | |
16 | 22 | #These are the defaults taken from the source code. |