uhm, maybe it's the default cron on admin that is giving error.

BTW, I'm getting an annoying pyfpdf window every time I start web2py from 
current trunk.

Fix is easy: when cron lines are defined as *applications/etc or 
**/applications/etc self.cmd becomes a list already for the intellingent 
parsing. Michael asked for allowing also custom processes to be run, but 
they required splitting, so we need to check if self.cmd is yet a list 
(usual cron lines) or not (custom processes)

@@ -223,8 +223,12 @@
         self.shell = shell
 
     def run(self):
+        if isinstance(self.cmd, (list,tuple)):
+            cmd = self.cmd
+        else:
+            cmd = self.cmd.split()
         import subprocess
-        proc = subprocess.Popen(self.cmd.split(),
+        proc = subprocess.Popen(cmd,
                                 stdin=subprocess.PIPE,
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE,




Il giorno lunedì 11 giugno 2012 21:13:59 UTC+2, szimszon ha scritto:
>
> I'm running it on Linux and I have nothing in cron. I use scheduler and 
> linux crontab.
>
> 2012. június 11., hétfő 20:58:55 UTC+2 időpontban Niphlod a következőt 
> írta:
>>
>> I'm running from source and I don't see the error, but I think I know 
>> what's going on.
>>
>> Have you something in your applications crontab ?
>>
>> also, are you on linux, mac or windows ?
>>
>> Il giorno lunedì 11 giugno 2012 18:49:58 UTC+2, simon ha scritto:
>>>
>>> I also get this. It appears after the "cron fix" update to trunk.
>>>
>>> On Monday, 11 June 2012 14:23:20 UTC+1, szimszon wrote:
>>>>
>>>> It's on the console where you start the web2py.py...
>>>>
>>>> 2012. június 11., hétfő 14:19:45 UTC+2 időpontban szimszon a következőt 
>>>> írta:
>>>>>
>>>>> http://code.google.com/p/web2py/issues/detail?id=849
>>>>>
>>>>> Exception in thread Thread-21:
>>>>> Traceback (most recent call last):
>>>>>   File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
>>>>>     self.run()
>>>>>   File "/home/szimszon/fejlesztes/sajat/web2py/gluon/newcron.py", line 
>>>>> 227, in run
>>>>>     proc = subprocess.Popen(self.cmd.split(),
>>>>> AttributeError: 'list' object has no attribute 'split'
>>>>>
>>>>> Version 2.00.0 (2012-06-10 01:18:28) dev
>>>>>
>>>>>
>>>>>

Reply via email to