Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
e058e7a5
Commit
e058e7a5
authored
Aug 09, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments to backend_factory
parent
b79ac4e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
backend_factory.py
hdlmake/fetch/backend_factory.py
+7
-1
No files found.
hdlmake/fetch/backend_factory.py
View file @
e058e7a5
...
...
@@ -19,12 +19,17 @@
# You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
"""Module providing the BackendFactory, a mechanism to create fetchers"""
import
logging
from
.constants
import
(
LOCAL
)
class
BackendFactory
(
object
):
"""Class providing instances that can be used to build fetchers
for the required source origin (Local, Git, SVN)"""
def
__init__
(
self
):
self
.
backend_table
=
{}
...
...
@@ -33,6 +38,7 @@ class BackendFactory(object):
self
.
backend_table
[
backend_id
]
=
backend
def
get_backend
(
self
,
module
):
"""Get the appropriated source origin backend for the given module"""
try
:
if
module
.
source
!=
LOCAL
:
logging
.
info
(
"Investigating module: "
+
str
(
module
)
+
...
...
@@ -45,5 +51,5 @@ class BackendFactory(object):
for
backend_id
in
self
.
backend_table
.
iterkeys
():
error_string
+=
"
\t
%
d"
%
(
backend_id
)
logging
.
error
(
error_string
)
raise
# this is serious enough we should let the exception keep going
raise
return
backend
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment