Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Production Test Suite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Production Test Suite
Commits
204114ab
Commit
204114ab
authored
Jan 09, 2017
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gen_flash_image: don't check adress if no address given
parent
91dfdb8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
gen_flash_image.py
sdbfs/gen_flash_image.py
+2
-2
No files found.
sdbfs/gen_flash_image.py
View file @
204114ab
...
@@ -30,7 +30,7 @@ GEN_EEPROM_CMD = "{path}./gensdbfs {path}sdbfs-eeprom {img}"
...
@@ -30,7 +30,7 @@ GEN_EEPROM_CMD = "{path}./gensdbfs {path}sdbfs-eeprom {img}"
###########################################################
###########################################################
def
check_mac
(
mac
):
def
check_mac
(
mac
):
if
not
re
.
match
(
"[0-9a-f]{2}([-:])[0-9a-f]{2}(
\\
1[0-9a-f]{2}){4}$"
,
mac
.
lower
()):
if
not
re
.
match
(
"[0-9a-f]{2}([-:])[0-9a-f]{2}(
\\
1[0-9a-f]{2}){4}$"
,
mac
.
lower
()):
print
"Not a valid MAC"
print
"Not a valid MAC
address
"
return
0
return
0
return
1
return
1
...
@@ -40,7 +40,7 @@ def check_mac(mac):
...
@@ -40,7 +40,7 @@ def check_mac(mac):
# type can be either "flash" or "eeprom"
# type can be either "flash" or "eeprom"
def
gen_sdb_image
(
type
,
mac
,
bstr
,
output
=
None
):
def
gen_sdb_image
(
type
,
mac
,
bstr
,
output
=
None
):
if
not
check_mac
(
mac
):
if
mac
and
not
check_mac
(
mac
):
return
return
# Translate MAC to be always in XX-XX-XX-XX-XX-XX format
# Translate MAC to be always in XX-XX-XX-XX-XX-XX format
...
...
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