mirror of https://github.com/skygpu/skynet.git
				
				
				
			Address last of fomo\'s comments, related to pinner logging, cleanup ipfs module
							parent
							
								
									5edd7f4db4
								
							
						
					
					
						commit
						5d67b3cd60
					
				| 
						 | 
				
			
			@ -24,7 +24,7 @@ class AsyncIPFSHTTP:
 | 
			
		|||
            raise IPFSClientException(resp.text)
 | 
			
		||||
 | 
			
		||||
        return resp.json()
 | 
			
		||||
#!/usr/bin/python
 | 
			
		||||
 | 
			
		||||
    async def add(self, file_path: Path, **kwargs):
 | 
			
		||||
        files = {
 | 
			
		||||
            'file': (file_path.name, file_path.open('rb'))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,4 @@
 | 
			
		|||
import logging
 | 
			
		||||
import traceback
 | 
			
		||||
 | 
			
		||||
from datetime import datetime, timedelta
 | 
			
		||||
 | 
			
		||||
import trio
 | 
			
		||||
| 
						 | 
				
			
			@ -117,8 +115,7 @@ class SkynetPinner:
 | 
			
		|||
                        n.start_soon(self.task_pin, cid)
 | 
			
		||||
 | 
			
		||||
                except OSError:
 | 
			
		||||
                    # TODO, use `logging.exception()` here instead ??
 | 
			
		||||
                    traceback.print_exc()
 | 
			
		||||
                    logging.exception('OSError while trying to pin?')
 | 
			
		||||
 | 
			
		||||
                except KeyboardInterrupt:
 | 
			
		||||
                    break
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue