Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
ca0bdf32
Commit
ca0bdf32
authored
Mar 10, 2013
by
Rémy Sanchez
Committed by
Timothée Peignier
Mar 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move is_outdated to compiler
parent
d1182201
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
AUTHORS
+1
-0
pipeline/compilers/__init__.py
+7
-7
No files found.
AUTHORS
View file @
ca0bdf32
...
@@ -37,6 +37,7 @@ or just made Pipeline more awesome.
...
@@ -37,6 +37,7 @@ or just made Pipeline more awesome.
* Peter Baumgartner <pete@lincolnloop.com>
* Peter Baumgartner <pete@lincolnloop.com>
* Pierre Drescher <pierre.drescher@gmail.com>
* Pierre Drescher <pierre.drescher@gmail.com>
* Remco Wendt <remco@maykinmedia.nl>
* Remco Wendt <remco@maykinmedia.nl>
* Remy Sanchez <remy.sanchez@hyperthese.net>
* Sam Thomson <sammthomson@gmail.com>
* Sam Thomson <sammthomson@gmail.com>
* Sander Smits <jhmsmits@gmail.com>
* Sander Smits <jhmsmits@gmail.com>
* Sirex <sirexas@gmail.com>
* Sirex <sirexas@gmail.com>
...
...
pipeline/compilers/__init__.py
View file @
ca0bdf32
...
@@ -37,7 +37,7 @@ class Compiler(object):
...
@@ -37,7 +37,7 @@ class Compiler(object):
outfile
=
self
.
output_path
(
infile
,
compiler
.
output_extension
)
outfile
=
self
.
output_path
(
infile
,
compiler
.
output_extension
)
outdated
=
True
outdated
=
True
else
:
else
:
outdated
=
self
.
is_outdated
(
input_path
,
output_path
)
outdated
=
compiler
.
is_outdated
(
infile
,
outfile
)
try
:
try
:
compiler
.
compile_file
(
infile
,
outfile
,
outdated
=
outdated
,
force
=
force
)
compiler
.
compile_file
(
infile
,
outfile
,
outdated
=
outdated
,
force
=
force
)
except
CompilerError
:
except
CompilerError
:
...
@@ -53,12 +53,6 @@ class Compiler(object):
...
@@ -53,12 +53,6 @@ class Compiler(object):
path
=
os
.
path
.
splitext
(
path
)
path
=
os
.
path
.
splitext
(
path
)
return
'.'
.
join
((
path
[
0
],
extension
))
return
'.'
.
join
((
path
[
0
],
extension
))
def
is_outdated
(
self
,
infile
,
outfile
):
try
:
return
self
.
storage
.
modified_time
(
infile
)
>
self
.
storage
.
modified_time
(
outfile
)
except
(
OSError
,
NotImplementedError
):
return
True
class
CompilerBase
(
object
):
class
CompilerBase
(
object
):
def
__init__
(
self
,
verbose
,
storage
):
def
__init__
(
self
,
verbose
,
storage
):
...
@@ -80,6 +74,12 @@ class CompilerBase(object):
...
@@ -80,6 +74,12 @@ class CompilerBase(object):
file
.
close
()
file
.
close
()
return
content
return
content
def
is_outdated
(
self
,
infile
,
outfile
):
try
:
return
self
.
storage
.
modified_time
(
infile
)
>
self
.
storage
.
modified_time
(
outfile
)
except
(
OSError
,
NotImplementedError
):
return
True
class
SubProcessCompiler
(
CompilerBase
):
class
SubProcessCompiler
(
CompilerBase
):
def
execute_command
(
self
,
command
,
content
=
None
,
cwd
=
None
):
def
execute_command
(
self
,
command
,
content
=
None
,
cwd
=
None
):
...
...
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