forked from endorphant/ttbp
		
	fixing more eject bugs
This commit is contained in:
		
							parent
							
								
									e8607aa42d
								
							
						
					
					
						commit
						3491cc7843
					
				
							
								
								
									
										14
									
								
								bin/ttbp.py
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								bin/ttbp.py
									
									
									
									
									
								
							| @ -382,12 +382,15 @@ def view_feed(): | |||||||
|         entryDir = os.path.join("/home", townie, ".ttbp", "entries") |         entryDir = os.path.join("/home", townie, ".ttbp", "entries") | ||||||
|         filenames = os.listdir(entryDir) |         filenames = os.listdir(entryDir) | ||||||
|         for entry in filenames: |         for entry in filenames: | ||||||
|             feedList.append(os.path.join(entryDir, entry)) |             ### REALLY MAKE A REAL FILENAME VALIDATOR | ||||||
|    |             fileSplit = os.path.splitext(entry) | ||||||
|  |             if len(fileSplit[0]) == 8 and fileSplit[1] == ".txt": | ||||||
|  |                 feedList.append(os.path.join(entryDir, entry)) | ||||||
|  | 
 | ||||||
|     metas = core.meta(feedList) |     metas = core.meta(feedList) | ||||||
|     metas.sort(key = lambda entry:entry[3]) |     metas.sort(key = lambda entry:entry[3]) | ||||||
|     metas.reverse() |     metas.reverse() | ||||||
|     | 
 | ||||||
|     entries = [] |     entries = [] | ||||||
|     for entry in metas[0:10]: |     for entry in metas[0:10]: | ||||||
|         pad = "" |         pad = "" | ||||||
| @ -421,7 +424,10 @@ def list_select(options, prompt): | |||||||
|     invalid = True |     invalid = True | ||||||
| 
 | 
 | ||||||
|     while invalid: |     while invalid: | ||||||
|         choice = raw_input("\n\n"+prompt) |         try: | ||||||
|  |             choice = raw_input("\n\n"+prompt) | ||||||
|  |         except KeyboardInterrupt: | ||||||
|  |             list_select(options, prompt) | ||||||
| 
 | 
 | ||||||
|         try: |         try: | ||||||
|             ans = int(choice) |             ans = int(choice) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user