[pitivi] misc: Cleanup path_from_uri



commit c7bf1c0b73322c8b833ab40cbb0a59e6c44478f4
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Jan 8 20:21:05 2014 +0100

    misc: Cleanup path_from_uri

 pitivi/utils/misc.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/utils/misc.py b/pitivi/utils/misc.py
index db41f9a..44efc86 100644
--- a/pitivi/utils/misc.py
+++ b/pitivi/utils/misc.py
@@ -160,13 +160,13 @@ def get_filesystem_encoding():
     return sys.getfilesystemencoding() or "utf-8"
 
 
-def path_from_uri(uri):
+def path_from_uri(raw_uri):
     """
-    Return a human-readable path that can be used with python's os.path
+    Return a path that can be used with Python's os.path.
     """
-    foo = urlparse(uri)
-    path = foo.netloc + foo.path
-    return unquote(path)
+    uri = urlparse(raw_uri)
+    assert uri.scheme == "file"
+    return unquote(uri.path)
 
 
 def filename_from_uri(uri):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]