Revision: 687 http://rpy.svn.sourceforge.net/rpy/?rev=687&view=rev Author: lgautier Date: 2008-11-08 15:05:39 +0000 (Sat, 08 Nov 2008)
Log Message: ----------- Informative message when 'R HOME' does not return anything Modified Paths: -------------- rpy2/branches/version_2.0.x/NEWS rpy2/branches/version_2.0.x/rpy/rinterface/__init__.py Modified: rpy2/branches/version_2.0.x/NEWS =================================================================== --- rpy2/branches/version_2.0.x/NEWS 2008-11-02 16:53:32 UTC (rev 686) +++ rpy2/branches/version_2.0.x/NEWS 2008-11-08 15:05:39 UTC (rev 687) @@ -1,8 +1,13 @@ SVN === +Bugs fixed +---------- +- Informative message returned as RuntimeError when `R RHOME` does not return + anything + Release 2.0.0rc1 ================ Modified: rpy2/branches/version_2.0.x/rpy/rinterface/__init__.py =================================================================== --- rpy2/branches/version_2.0.x/rpy/rinterface/__init__.py 2008-11-02 16:53:32 UTC (rev 686) +++ rpy2/branches/version_2.0.x/rpy/rinterface/__init__.py 2008-11-08 15:05:39 UTC (rev 687) @@ -4,6 +4,10 @@ R_HOME = os.environ["R_HOME"] except KeyError: R_HOME = os.popen("R RHOME").readlines() + if len(R_HOME) == 0: + raise RuntimeError( + "Calling the command 'R RHOME' does not return anything.\n" +\ + "This might be because R.exe is nowhere in your Path.") #Twist if 'R RHOME' spits out a warning if R_HOME[0].startswith("WARNING"): R_HOME = R_HOME[1] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list