clampak / cyg-apt

Automatically exported from code.google.com/p/cyg-apt
0 stars 0 forks source link

No Error Handling on "cyg-apt missing" #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
================================================ 
What steps will reproduce the problem?
================================================  
$ cyg-apt missing

================================================  
What is the expected output? 
================================================  
My packages are up to date AFAIK.  One would 
expect to see some message saying that all of
my packages are up to date.  Instead, however,
I get ...

================================================  
What do you see instead?
================================================ 
cyg-apt: downloading: (mirror)/setup.bz2 
cyg-apt: downloading: (mirror)/setup.ini.sig
Please be advised that this is a major release.
Traceback (most recent call last):
  File "/usr/bin/cyg-apt", line 1581, in <module>
    main ()
  File "/usr/bin/cyg-apt", line 1565, in main
    main_scriptname)
  File "/usr/bin/cyg-apt", line 539, in __init__
    self.get_setup_ini()
  File "/usr/bin/cyg-apt", line 622, in get_setup_ini
    string.split(lines[j], ': ', 1))
ValueError: need more than 1 value to unpack

================================================  
What version of the product are you using? 
================================================  
cyg-apt-1.071

================================================  
On what operating system?
================================================  
Windows 7 x64

================================================  
Please provide any additional information below.
================================================  
Seems like you guys are coding in python poorly.
Seems like you need to replace code with:

try:
   string.split(lines[j], ': ', 1))
except:
   print "Packages up to date"

I haven't looked at your code so not sure if this is
indeed the problem (that there are no updates and it's
trying to split an empty string), but if so, the above 
will work.

Original issue reported on code.google.com by Adam.Mar...@gmail.com on 25 May 2010 at 2:01

GoogleCodeExporter commented 8 years ago
Get the same with "cyg-apt new"

Original comment by Adam.Mar...@gmail.com on 25 May 2010 at 2:02

GoogleCodeExporter commented 8 years ago
did you try python cyg-apt setup    ???

Original comment by jclegg42002 on 25 May 2010 at 2:17

GoogleCodeExporter commented 8 years ago
No.  I followed the installation instructions (installed from 
install-cyg-apt.sh).

Original comment by Adam.Mar...@gmail.com on 25 May 2010 at 3:17

GoogleCodeExporter commented 8 years ago
This issue is fixed in my fork of the project:

https://github.com/nylen/cyg-apt

Original comment by jny...@gmail.com on 4 Dec 2012 at 9:58