kopia lustrzana https://github.com/piku/piku
				
				
				
			Merge pull request #217 from chr15m/fix-cron-on-py3.5
Fix cron regex matching on py3.5pull/224/head
						commit
						7263a9c4ad
					
				
							
								
								
									
										4
									
								
								piku.py
								
								
								
								
							
							
						
						
									
										4
									
								
								piku.py
								
								
								
								
							| 
						 | 
				
			
			@ -261,10 +261,10 @@ def parse_procfile(filename):
 | 
			
		|||
                # Check for cron patterns
 | 
			
		||||
                if kind == "cron":
 | 
			
		||||
                    limits = [59, 24, 31, 12, 7]
 | 
			
		||||
                    matches = match(CRON_REGEXP, command)
 | 
			
		||||
                    matches = match(CRON_REGEXP, command).groups()
 | 
			
		||||
                    if matches:
 | 
			
		||||
                        for i in range(len(limits)):
 | 
			
		||||
                            if int(matches[i + 1].replace("*/", "").replace("*", "1")) > limits[i]:
 | 
			
		||||
                            if int(matches[i].replace("*/", "").replace("*", "1")) > limits[i]:
 | 
			
		||||
                                raise ValueError
 | 
			
		||||
                workers[kind] = command
 | 
			
		||||
            except Exception:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue