Show More
@@ -32,10 +32,10 b' def upgrade(nb, from_version=1):' | |||
|
32 | 32 | ---------- |
|
33 | 33 | nb : NotebookNode |
|
34 | 34 | The Python representation of the notebook to convert. |
|
35 |
|
|
|
36 |
The |
|
|
35 | from_version : int | |
|
36 | The version of the notebook to convert from. | |
|
37 | 37 | """ |
|
38 |
if |
|
|
38 | if from_version == 1: | |
|
39 | 39 | newnb = new_notebook() |
|
40 | 40 | ws = new_worksheet() |
|
41 | 41 | for cell in nb.cells: |
@@ -47,7 +47,7 b' def upgrade(nb, from_version=1):' | |||
|
47 | 47 | newnb.worksheets.append(ws) |
|
48 | 48 | return newnb |
|
49 | 49 | else: |
|
50 |
raise ValueError('Cannot convert a notebook from v%s to v2' % |
|
|
50 | raise ValueError('Cannot convert a notebook from v%s to v2' % from_version) | |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | def downgrade(nb): |
General Comments 0
You need to be logged in to leave comments.
Login now