Tue 20 May 2003 03:01:08 PM UTC, comment #4:
Have to replace :
if ord(extract[0]) == 0 or limit > 100:
with :
if ord(extract[0]) == 0 or ord(extract[0]) == ord('\n') or limit > 100:
As the /b of string/b is not implemented the result will be "client.sh: a /bin/sh script text executable" and not "client.sh: Bourne shell script text executable".
However there is possibly still a bug so please do not update yet, I am still investigating.
|
Tue 20 May 2003 02:00:35 PM UTC, comment #2:
A more recent version of the code available at
http://www.slhan.org/software/python.html. it contain few bug fixes.
Circle code have a wrapper file so it should just be a matter of replacing magic.py and convert.py with the new files when I fixed the bug.
Feel free to contact me should you want to understand the code.
AFAI can see, it seems that the problems come from changes in python with version 2.2 (the self check of convert.py fail so I should expect some issues).
I am looking at the problem now.
/Thomas
|
Sat 17 May 2003 03:43:22 PM UTC, original submission:
fileserver_poller crashes for a magic reason:
Traceback (most recent call last):
File "/home/voegtlin/circle/circlelib/utility.py", line 746, in run
apply(self.function,(self.manager,) + self.parameters)
File "/home/voegtlin/circle/circlelib/utility.py", line 863, in applier_task
apply(func,param)
File "/home/voegtlin/circle/circlelib/file_server.py", line 794, in file_server_poller
result = build_entry(item[0],server.entries.get(item[0],None),item[1],server.cache,new_cache)
File "/home/voegtlin/circle/circlelib/file_server.py", line 745, in build_entry
result = build_file(path, mtime,flags,old_cache,new_cache)
File "/home/voegtlin/circle/circlelib/file_server.py", line 674, in build_file
information = classify.classifier.information(path)
File "/home/voegtlin/circle/circlelib/classify.py", line 55, in information
result['generic']=self.magic['linux'].classify(file)
File "/home/voegtlin/circle/circlelib/magic.py", line 537, in classify
if ord(extract[0]) == 0 or limit > 100:
IndexError: string index out of range
the crash occurs when a given file is in my shared directory. the file in question is called client.sh
Here is the content of this file:
[voegtlin@localhost circle]$ cat ../shared/client.sh
#!/bin/sh
/usr/bin/circled get "circle-file:"$URI_DATA
exit;
I do not understand the code in magic.py quite well.
the reason might be obvious. any idea?
|