summaryrefslogtreecommitdiffstats
path: root/pym/portage/news.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/news.py')
-rw-r--r--pym/portage/news.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/portage/news.py b/pym/portage/news.py
index 540372e10..da7e159af 100644
--- a/pym/portage/news.py
+++ b/pym/portage/news.py
@@ -36,10 +36,12 @@ class NewsManager(object):
portdir = portdb.porttree_root
profiles_base = os.path.join(portdir, 'profiles') + os.path.sep
- profile_path = normalize_path(
- os.path.realpath(portdb.mysettings.profile_path))
- if profile_path.startswith(profiles_base):
- profile_path = profile_path[len(profiles_base):]
+ profile_path = None
+ if portdb.mysettings.profile_path:
+ profile_path = normalize_path(
+ os.path.realpath(portdb.mysettings.profile_path))
+ if profile_path.startswith(profiles_base):
+ profile_path = profile_path[len(profiles_base):]
self._profile_path = profile_path
# Ensure that the unread path exists and is writable.