mailr7983 - /1.3/generic_fns/results.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on November 12, 2008 - 21:49:
Author: bugman
Date: Wed Nov 12 21:49:03 2008
New Revision: 7983

URL: http://svn.gna.org/viewcvs/relax?rev=7983&view=rev
Log:
Fix for bug #12588 (https://gna.org/bugs/index.php?12588).

This bug was reported by Tyler Reddy (treddy at dal dot ca).

The problem was that the results.read() user function was not handling the 
directory name being part
of the file name argument.  This can now be handled.


Modified:
    1.3/generic_fns/results.py

Modified: 1.3/generic_fns/results.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/results.py?rev=7983&r1=7982&r2=7983&view=diff
==============================================================================
--- 1.3/generic_fns/results.py (original)
+++ 1.3/generic_fns/results.py Wed Nov 12 21:49:03 2008
@@ -24,6 +24,7 @@
 """Module for reading/writing/displaying the results in a data pipe."""
 
 # Python module imports.
+from os.path import dirname
 from re import search
 from string import split
 import sys
@@ -88,14 +89,14 @@
     file_path = get_file_path(file_name=file, dir=directory)
 
     # Open the file.
-    file = open_read_file(file_name=file, dir=directory)
+    file = open_read_file(file_name=file_path)
 
     # Determine the format of the file.
     format = determine_format(file)
 
     # XML results.
     if format == 'xml':
-        read_function = ds.from_xml(file, dir=directory)
+        read_function = ds.from_xml(file, dir=dirname(file_path))
 
     # Columnar results.
     elif format == 'columnar':




Related Messages


Powered by MHonArc, Updated Wed Nov 12 22:00:04 2008