File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 3
3
from collections import defaultdict
4
4
from pathlib import Path
5
5
import pprint
6
+ import warnings
6
7
7
8
from jinja2 import Template
8
9
from yaml import safe_load
28
29
print (f" { package ['repo' ]} -> { package ['section' ]} " )
29
30
try :
30
31
package ['user' ], package ['repo_name' ] = package ['repo' ].split ('/' )
31
- except :
32
- raise Warning ( 'Package.repo is not in correct format' , package )
32
+ except ValueError :
33
+ warnings . warn ( f 'Package.repo is not in correct format: { package } ' )
33
34
continue
34
35
package .setdefault ('conda_package' , package ['repo_name' ])
35
36
package .setdefault ('pypi_name' , package ['repo_name' ])
Original file line number Diff line number Diff line change 8
8
import os
9
9
from pathlib import Path
10
10
from yaml import safe_load
11
+ import warnings
11
12
12
13
import intake
13
14
import requests
@@ -71,8 +72,8 @@ def get_conda_badge(conda_package):
71
72
for package in section ['packages' ]:
72
73
try :
73
74
package ['user' ], package ['repo_name' ] = package ['repo' ].split ('/' )
74
- except :
75
- raise Warning ( 'Package.repo is not in correct format' , package )
75
+ except ValueError :
76
+ warnings . warn ( f 'Package.repo is not in correct format: { package } ' )
76
77
continue
77
78
url = get_conda_badge (package .get ('conda_package' , package ['repo_name' ]))
78
79
rendered_url = url
You can’t perform that action at this time.
0 commit comments