Stop location being referenced before assignment
In cases where the location can't be determined by the device or a
config setting, the location variable wouldn't exist but it would still
be referenced.
This makes sure the variable always exists, but if not changed is equal
to None
@@ -139,6 +139,7 @@ class RemoteConf(LocalConf):
api = DeviceApi()
setting = api.get_settings()
+ location = None
try:
location = api.get_location()
except RequestException as e:
