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)
 | 
					            raise IPFSClientException(resp.text)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return resp.json()
 | 
					        return resp.json()
 | 
				
			||||||
#!/usr/bin/python
 | 
					
 | 
				
			||||||
    async def add(self, file_path: Path, **kwargs):
 | 
					    async def add(self, file_path: Path, **kwargs):
 | 
				
			||||||
        files = {
 | 
					        files = {
 | 
				
			||||||
            'file': (file_path.name, file_path.open('rb'))
 | 
					            'file': (file_path.name, file_path.open('rb'))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,4 @@
 | 
				
			||||||
import logging
 | 
					import logging
 | 
				
			||||||
import traceback
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
from datetime import datetime, timedelta
 | 
					from datetime import datetime, timedelta
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import trio
 | 
					import trio
 | 
				
			||||||
| 
						 | 
					@ -117,8 +115,7 @@ class SkynetPinner:
 | 
				
			||||||
                        n.start_soon(self.task_pin, cid)
 | 
					                        n.start_soon(self.task_pin, cid)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                except OSError:
 | 
					                except OSError:
 | 
				
			||||||
                    # TODO, use `logging.exception()` here instead ??
 | 
					                    logging.exception('OSError while trying to pin?')
 | 
				
			||||||
                    traceback.print_exc()
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                except KeyboardInterrupt:
 | 
					                except KeyboardInterrupt:
 | 
				
			||||||
                    break
 | 
					                    break
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue