You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jan Evert van Grootheest <j....@euronext.nl> on 2003/09/26 15:07:01 UTC

hot-backup.py fails

Hello,

As I know nothing of Python at all, I come to you with a question. 
Hopefully somebody will be kind enough to help me.

The hot-backup.py script fails. This is what it says:
Beginning hot backup of '/home/switch/svn/currentdb/MAL2/'.
Traceback (innermost last):
   File 
"/home/switch/svn/current/usr/lib/subversion/tools/backup/hot-backup.py", 
line 94, in ?
     infile, outfile, errfile = os.popen3(svnlook + " youngest " + repo_dir)
AttributeError: popen3
-------- end of output -----------

What does this mean?
What's going wrong here?

RPM claims that this is installed: python-1.5.2-38. I'm trying this on 
RH advanced server, which is very much comparable to RH 7.3.

Thanks for any help you could provide.
Jan Evert


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: hot-backup.py fails

Posted by Anthony Baxter <an...@interlink.com.au>.
>>> Jan Evert van Grootheest wrote
> Anthony,
> 
> thanks for this suggestion, it makes this line work.
> But now the next line then fails.

Which line fails? Can you post the traceback?



-- 
Anthony Baxter     <an...@interlink.com.au>   
It's never too late to have a happy childhood.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: hot-backup.py fails

Posted by Jan Evert van Grootheest <j....@euronext.nl>.
Anthony,

thanks for this suggestion, it makes this line work.
But now the next line then fails.

I guess the better option is to install a newer python.

Thanks,
Jan Evert

Anthony Baxter wrote:

>>>>Seth Falcon wrote
>>
>>In other words, install a more recent version of Python and the script
>>should work.
> 
> 
> Alternately, replace the code with
> import popen2
> popen2.popen3(...)
> 
> This should work on older versions of Python as well as newer versions.
> 
> 
>>This should probably be noted somewhere because RedHat continues to ship
>>(AFAIK) with an _old_ version of Python (1.5.x).  Perhaps something like
>>the following could be added to hot-backup.py:
> 
> 
> This is no longer the case. Certainly, on this RH9 system, python is 
> python2.2.2. I think that RH8 and later ships with python2.2.
> 
> 
>>    major = sys.version_info[0]
>>    if major < 2: # tell user to upgrade Python and exit gracefully
> 
> 
> If it's just popen3 that's needed, the above fix is better. If there's
> other reasons for Python2, then you'll need something like the above.
> Note, though, that sys.version_info wasn't in Python 1.5.2. You instead
> want something like
>    version = string.split(sys.version)[0]
>    if version < '2':
>       raise UpgradePythonPlease
> 
> Anthony
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: hot-backup.py fails

Posted by Anthony Baxter <an...@interlink.com.au>.
>>> Seth Falcon wrote
> In other words, install a more recent version of Python and the script
> should work.

Alternately, replace the code with
import popen2
popen2.popen3(...)

This should work on older versions of Python as well as newer versions.

> This should probably be noted somewhere because RedHat continues to ship
> (AFAIK) with an _old_ version of Python (1.5.x).  Perhaps something like
> the following could be added to hot-backup.py:

This is no longer the case. Certainly, on this RH9 system, python is 
python2.2.2. I think that RH8 and later ships with python2.2.

>     major = sys.version_info[0]
>     if major < 2: # tell user to upgrade Python and exit gracefully

If it's just popen3 that's needed, the above fix is better. If there's
other reasons for Python2, then you'll need something like the above.
Note, though, that sys.version_info wasn't in Python 1.5.2. You instead
want something like
   version = string.split(sys.version)[0]
   if version < '2':
      raise UpgradePythonPlease

Anthony

-- 
Anthony Baxter     <an...@interlink.com.au>   
It's never too late to have a happy childhood.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: hot-backup.py fails

Posted by Seth Falcon <sf...@fhcrc.org>.
> I believe that popen3 is new to Python 2.x.
> 

In other words, install a more recent version of Python and the script
should work.

This should probably be noted somewhere because RedHat continues to ship
(AFAIK) with an _old_ version of Python (1.5.x).  Perhaps something like
the following could be added to hot-backup.py:

    major = sys.version_info[0]
    if major < 2: # tell user to upgrade Python and exit gracefully


+ seth

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: hot-backup.py fails

Posted by "C. Michael Pilato" <cm...@collab.net>.
Jan Evert van Grootheest <j....@euronext.nl> writes:

> Hello,
> 
> As I know nothing of Python at all, I come to you with a
> question. Hopefully somebody will be kind enough to help me.
> 
> The hot-backup.py script fails. This is what it says:
> Beginning hot backup of '/home/switch/svn/currentdb/MAL2/'.
> Traceback (innermost last):
>    File
> "/home/switch/svn/current/usr/lib/subversion/tools/backup/hot-backup.py",
> line 94, in ?
>      infile, outfile, errfile = os.popen3(svnlook + " youngest " + repo_dir)
> AttributeError: popen3

I believe that popen3 is new to Python 2.x.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org